import requests
from lxml import etree

start_url = "http://www.mzitu.com/all"

usr_agent = "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.117 Safari/537.36"
referer = "http://www.mzitu.com"

headers = {
    "User-Agent" : usr_agent,
    "Referer" : referer
}

respon = requests.get(start_url, headers=headers)

html = etree.HTML(respon.content.decode())
print(html)
urls = html.xpath("//div[@class='all']//li//a/@href")
# print(respon.content.decode())

for url in urls:
    print(url)
